﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TxtPagination.ascx.cs" Inherits="FortuneHeaven.Admin.Controls.TxtPagination" %>
<script type="text/javascript">
    document.onkeydown = function () {
        var t1 = $('#<%=txtToPage.ClientID%>');
        var b = $('#<%=btGoto.ClientID%>');
        if (event.keyCode == 13 && (event.srcElement == t1)) {
            window.event.cancelEvent = true;
            window.event.returnValue = false;
            b.click();
        }
    }
    $(document).ready(function () {
        var t1 = $('#<%=txtToPage.ClientID%>');
        var b = $('#<%=btGoto.ClientID%>');
        t1.keypress(function (e) {

            if (e.which == 13) {

                b.click();
                e.cancelBubble = true;
                e.returnValue = false;
                return false;
            }
        });
    });
    
</script>
[<asp:LinkButton ID="btnFirst" runat="server" 
    onclick="btnFirst_Click">首页</asp:LinkButton>
 | 
<asp:LinkButton ID="btnPrev" runat="server" onclick="btnPrev_Click">上一页</asp:LinkButton>
 | 
<asp:LinkButton ID="btnNext" runat="server" onclick="btnNext_Click">下一页</asp:LinkButton>
 | 
<asp:LinkButton ID="btnFinal" runat="server" onclick="btnFinal_Click">末页</asp:LinkButton>
] 
<span>页数:</span><asp:Label ID="lbTotalPage" runat="server" Text=""></asp:Label>
<span>&nbsp;到<asp:TextBox ID="txtToPage" size="2" number runat="server" ></asp:TextBox> 
<asp:Button ID="btGoto" runat="server" Text="页"  onclick="btnGotoClick"/> </span>
